package com.vita.core.value;

import com.vita.core.task.Task;
import com.vita.core.task.TaskExecute;

import java.util.ArrayList;
import java.util.List;

/**
 * 数值仓库
 */
public class ValueStore<T> implements Task,Getter<T> {
    public List<T> list = new ArrayList<>();

    public ValueStore() {
    }

    public ValueStore(T t) {
        this.list.add(t);
    }

    public ValueStore<T> add(T t) {
        this.list.add(t);
        return this;
    }

    @Override
    public List<T> get() {
        return list;
    }

    @Override
    public void plan(TaskExecute execute) {

    }
}
